package edu.monash.lbc.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import edu.monash.lbc.persistence.repository.OrderRepository;
import edu.monash.lbc.persistence.service.MenuPersistenceEventHandler;
import edu.monash.lbc.persistence.service.MenuPersistenceService;
import edu.monash.lbc.persistence.service.OrderPersistenceEventHandler;
import edu.monash.lbc.persistence.service.OrderPersistenceService;

@Configuration
public class PersistenceConfig {
	
	@Autowired
	private OrderRepository orderRepository;
	
	@Bean 
	public OrderPersistenceService orderPersistenceService() {
		return new OrderPersistenceEventHandler(orderRepository);
	} 
		
}
